package com.base.util;

import android.content.Context;
import android.util.Log;

public class MLog {
	private static String TAG = "com.test";
	private static String ERROR_TAG = "com.test.err";
	
	public static void d(Object msg) {
		Log.d(TAG, msg.toString());
	}
	
	public static void e(Object message, Throwable e) {
		Log.e(ERROR_TAG, message.toString(), e);
	}
	
	public static void e(Object message) {
		Log.e(ERROR_TAG, message.toString());
	}
	
	public static void e(Throwable e) {
		Log.e(ERROR_TAG, e.toString(), e);
	}
	
	public static void e(Context context, Throwable e) {
		showErrToast(context, e.toString());
	}
	
	public static void showErrToast(Context context, Object msg) {
		if(ConstantResource.IS_SHOW_LOG) {
			Helper.toast(context, msg.toString());
		}
	}
}
